﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace App.Model
{
    public class HuiZongMoBan
    {
        public List<HuiZongSon> DomainHuiZongSons { set; get; }
    }

    public class HuiZongSon
    {
        public int sx { set; get; }
        public string gznr { set; get; }
        public int nrid { set; get; }
    }

    public class HuiZongDeFen
    {
        public int mkhbid { set; get; }

        public string xingming { set; get; }
        public string keshi { set; get; }
        public string zhiwei { set; get; }
        public string zhanghao { set; get; }
        public decimal fujiaxiang { set; get; }
        public List<DeFen> Domain_DeFens { set; get; }
        public decimal zongfen
        {
            set { }
            get
            {
                if (Domain_DeFens != null)
                {
                    
                    return Domain_DeFens.Sum(s => s.defen)+ this.fujiaxiang;
                }
                else
                {
                    return 0;
                }
            }
        }

        public string linshigongzuo { set; get; }


    }


    public class DeFen
    {
        public int sx { set; get; }
        public string gznr { set; get; }
        public int nrid { set; get; }
        public decimal defen { set; get; }
    }
}
